home *** CD-ROM | disk | FTP | other *** search
Unknown | 1999-09-27 | 10.8 KB |
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 42 ac 01 2f 2f 3d 3d 3d |........|B..//===|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0a 2f 2f 20 55 |========|==..// U|
|00000060| 64 70 53 65 72 76 65 72 | 51 75 65 72 79 0d 0a 2f |dpServer|Query../|
|00000070| 2f 0d 0a 2f 2f 20 56 65 | 72 73 69 6f 6e 3a 20 31 |/..// Ve|rsion: 1|
|00000080| 2e 35 0d 0a 2f 2f 0d 0a | 2f 2f 20 54 68 69 73 20 |.5..//..|// This |
|00000090| 71 75 65 72 79 20 73 65 | 72 76 65 72 20 69 73 20 |query se|rver is |
|000000a0| 63 6f 6d 70 6c 69 61 6e | 74 20 77 69 74 68 20 74 |complian|t with t|
|000000b0| 68 65 20 47 61 6d 65 53 | 70 79 20 55 70 6c 69 6e |he GameS|py Uplin|
|000000c0| 6b 20 53 70 65 63 69 66 | 69 63 61 74 69 6f 6e 2e |k Specif|ication.|
|000000d0| 0d 0a 2f 2f 20 54 68 65 | 20 73 70 65 63 69 66 69 |..// The| specifi|
|000000e0| 63 61 74 69 6f 6e 20 69 | 73 20 61 76 61 69 6c 61 |cation i|s availa|
|000000f0| 62 6c 65 20 61 74 20 68 | 74 74 70 3a 2f 2f 77 77 |ble at h|ttp://ww|
|00000100| 77 2e 67 61 6d 65 73 70 | 79 2e 63 6f 6d 2f 64 65 |w.gamesp|y.com/de|
|00000110| 76 65 6c 6f 70 65 72 0d | 0a 2f 2f 20 61 6e 64 20 |veloper.|.// and |
|00000120| 6d 69 67 68 74 20 62 65 | 20 6f 66 20 75 73 65 20 |might be| of use |
|00000130| 74 6f 20 70 72 6f 67 61 | 6d 6d 65 72 73 20 77 68 |to proga|mmers wh|
|00000140| 6f 20 61 72 65 20 77 72 | 69 74 69 6e 67 20 6f 72 |o are wr|iting or|
|00000150| 20 6d 61 69 6e 74 61 69 | 6e 69 6e 67 0d 0a 2f 2f | maintai|ning..//|
|00000160| 20 74 68 65 69 72 20 6f | 77 6e 20 73 74 61 74 20 | their o|wn stat |
|00000170| 67 61 74 68 65 72 69 6e | 67 2f 67 61 6d 65 20 71 |gatherin|g/game q|
|00000180| 75 65 72 79 69 6e 67 20 | 73 6f 66 74 77 61 72 65 |uerying |software|
|00000190| 2e 0d 0a 2f 2f 0d 0a 2f | 2f 20 4e 6f 74 65 3a 20 |...//../|/ Note: |
|000001a0| 43 75 72 72 65 6e 74 6c | 79 2c 20 53 65 6e 64 54 |Currentl|y, SendT|
|000001b0| 65 78 74 20 72 65 74 75 | 72 6e 73 20 66 61 6c 73 |ext retu|rns fals|
|000001c0| 65 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 2e |e if suc|cessful.|
|000001d0| 0d 0a 2f 2f 0d 0a 2f 2f | 20 46 75 6c 6c 20 64 6f |..//..//| Full do|
|000001e0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 6e 20 74 |cumentat|ion on t|
|000001f0| 68 69 73 20 63 6c 61 73 | 73 20 69 73 20 61 76 61 |his clas|s is ava|
|00000200| 69 6c 61 62 6c 65 20 61 | 74 20 68 74 74 70 3a 2f |ilable a|t http:/|
|00000210| 2f 75 6e 72 65 61 6c 2e | 65 70 69 63 67 61 6d 65 |/unreal.|epicgame|
|00000220| 73 2e 63 6f 6d 2f 0d 0a | 2f 2f 0d 0a 2f 2f 3d 3d |s.com/..|//..//==|
|00000230| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000240| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000250| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000260| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000270| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 0d 0a 63 6c 61 |========|===..cla|
|00000280| 73 73 20 55 64 70 53 65 | 72 76 65 72 51 75 65 72 |ss UdpSe|rverQuer|
|00000290| 79 20 65 78 74 65 6e 64 | 73 20 55 64 70 4c 69 6e |y extend|s UdpLin|
|000002a0| 6b 20 63 6f 6e 66 69 67 | 3b 0d 0a 0d 0a 2f 2f 20 |k config|;....// |
|000002b0| 47 61 6d 65 20 53 65 72 | 76 65 72 20 43 6f 6e 66 |Game Ser|ver Conf|
|000002c0| 69 67 2e 0d 0a 76 61 72 | 28 29 20 6e 61 6d 65 09 |ig...var|() name.|
|000002d0| 09 09 09 09 51 75 65 72 | 79 4e 61 6d 65 3b 09 09 |....Quer|yName;..|
|000002e0| 09 2f 2f 20 4e 61 6d 65 | 20 74 6f 20 73 65 74 20 |.// Name| to set |
|000002f0| 74 68 69 73 20 6f 62 6a | 65 63 74 27 73 20 54 61 |this obj|ect's Ta|
|00000300| 67 20 74 6f 2e 0d 0a 76 | 61 72 20 69 6e 74 09 09 |g to...v|ar int..|
|00000310| 09 09 09 20 20 20 20 43 | 75 72 72 65 6e 74 51 75 |... C|urrentQu|
|00000320| 65 72 79 4e 75 6d 3b 09 | 2f 2f 20 51 75 65 72 79 |eryNum;.|// Query|
|00000330| 20 49 44 20 4e 75 6d 62 | 65 72 2e 0d 0a 76 61 72 | ID Numb|er...var|
|00000340| 20 67 6c 6f 62 61 6c 63 | 6f 6e 66 69 67 20 73 74 | globalc|onfig st|
|00000350| 72 69 6e 67 09 09 47 61 | 6d 65 4e 61 6d 65 3b 0d |ring..Ga|meName;.|
|00000360| 0a 0d 0a 2f 2f 20 49 6e | 69 74 69 61 6c 69 7a 65 |...// In|itialize|
|00000370| 2e 0d 0a 66 75 6e 63 74 | 69 6f 6e 20 50 72 65 42 |...funct|ion PreB|
|00000380| 65 67 69 6e 50 6c 61 79 | 28 29 0d 0a 7b 0d 0a 09 |eginPlay|()..{...|
|00000390| 6c 6f 63 61 6c 20 69 6e | 74 20 62 6f 75 6e 64 70 |local in|t boundp|
|000003a0| 6f 72 74 3b 0d 0a 0d 0a | 09 2f 2f 20 53 65 74 20 |ort;....|.// Set |
|000003b0| 74 68 65 20 54 61 67 0d | 0a 09 54 61 67 20 3d 20 |the Tag.|..Tag = |
|000003c0| 51 75 65 72 79 4e 61 6d | 65 3b 0d 0a 0d 0a 09 2f |QueryNam|e;...../|
|000003d0| 2f 20 42 69 6e 64 20 74 | 68 65 20 6c 69 73 74 65 |/ Bind t|he liste|
|000003e0| 6e 20 73 6f 63 6b 65 74 | 0d 0a 09 62 6f 75 6e 64 |n socket|...bound|
|000003f0| 70 6f 72 74 20 3d 20 42 | 69 6e 64 50 6f 72 74 28 |port = B|indPort(|
|00000400| 4c 65 76 65 6c 2e 47 61 | 6d 65 2e 47 65 74 53 65 |Level.Ga|me.GetSe|
|00000410| 72 76 65 72 50 6f 72 74 | 28 29 2c 20 74 72 75 65 |rverPort|(), true|
|00000420| 29 3b 0d 0a 09 69 66 28 | 20 62 6f 75 6e 64 70 6f |);...if(| boundpo|
|00000430| 72 74 20 3d 3d 20 30 20 | 29 0d 0a 09 7b 0d 0a 09 |rt == 0 |)...{...|
|00000440| 09 4c 6f 67 28 22 55 64 | 70 53 65 72 76 65 72 51 |.Log("Ud|pServerQ|
|00000450| 75 65 72 79 3a 20 50 6f | 72 74 20 66 61 69 6c 65 |uery: Po|rt faile|
|00000460| 64 20 74 6f 20 62 69 6e | 64 2e 22 29 3b 0d 0a 09 |d to bin|d.");...|
|00000470| 09 72 65 74 75 72 6e 3b | 0d 0a 09 7d 0d 0a 09 4c |.return;|...}...L|
|00000480| 6f 67 28 22 55 64 70 53 | 65 72 76 65 72 51 75 65 |og("UdpS|erverQue|
|00000490| 72 79 3a 20 50 6f 72 74 | 20 22 24 62 6f 75 6e 64 |ry: Port| "$bound|
|000004a0| 70 6f 72 74 24 22 20 73 | 75 63 63 65 73 73 66 75 |port$" s|uccessfu|
|000004b0| 6c 6c 79 20 62 6f 75 6e | 64 2e 22 29 3b 0d 0a 7d |lly boun|d.");..}|
|000004c0| 0d 0a 0d 0a 66 75 6e 63 | 74 69 6f 6e 20 50 6f 73 |....func|tion Pos|
|000004d0| 74 42 65 67 69 6e 50 6c | 61 79 28 29 0d 0a 7b 0d |tBeginPl|ay()..{.|
|000004e0| 0a 09 6c 6f 63 61 6c 20 | 55 64 70 42 65 61 63 6f |..local |UdpBeaco|
|000004f0| 6e 09 42 65 61 63 6f 6e | 3b 0d 0a 0d 0a 09 66 6f |n.Beacon|;.....fo|
|00000500| 72 65 61 63 68 20 41 6c | 6c 41 63 74 6f 72 73 28 |reach Al|lActors(|
|00000510| 63 6c 61 73 73 27 55 64 | 70 42 65 61 63 6f 6e 27 |class'Ud|pBeacon'|
|00000520| 2c 20 42 65 61 63 6f 6e | 29 0d 0a 09 7b 0d 0a 09 |, Beacon|)...{...|
|00000530| 09 42 65 61 63 6f 6e 2e | 55 64 70 53 65 72 76 65 |.Beacon.|UdpServe|
|00000540| 72 51 75 65 72 79 50 6f | 72 74 20 3d 20 50 6f 72 |rQueryPo|rt = Por|
|00000550| 74 3b 0d 0a 09 7d 0d 0a | 09 53 75 70 65 72 2e 50 |t;...}..|.Super.P|
|00000560| 6f 73 74 42 65 67 69 6e | 50 6c 61 79 28 29 3b 0d |ostBegin|Play();.|
|00000570| 0a 7d 0d 0a 0d 0a 2f 2f | 20 52 65 63 65 69 76 65 |.}....//| Receive|
|00000580| 64 20 61 20 71 75 65 72 | 79 20 72 65 71 75 65 73 |d a quer|y reques|
|00000590| 74 2e 0d 0a 65 76 65 6e | 74 20 52 65 63 65 69 76 |t...even|t Receiv|
|000005a0| 65 64 54 65 78 74 28 20 | 49 70 41 64 64 72 20 41 |edText( |IpAddr A|
|000005b0| 64 64 72 2c 20 73 74 72 | 69 6e 67 20 54 65 78 74 |ddr, str|ing Text|
|000005c0| 20 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 73 74 | )..{...|local st|
|000005d0| 72 69 6e 67 20 51 75 65 | 72 79 3b 0d 0a 09 6c 6f |ring Que|ry;...lo|
|000005e0| 63 61 6c 20 62 6f 6f 6c | 20 51 75 65 72 79 52 65 |cal bool| QueryRe|
|000005f0| 6d 61 69 6e 69 6e 67 3b | 0d 0a 09 6c 6f 63 61 6c |maining;|...local|
|00000600| 20 69 6e 74 20 20 51 75 | 65 72 79 4e 75 6d 2c 20 | int Qu|eryNum, |
|00000610| 50 61 63 6b 65 74 4e 75 | 6d 3b 0d 0a 0d 0a 09 2f |PacketNu|m;...../|
|00000620| 2f 20 41 73 73 69 67 6e | 20 74 68 69 73 20 70 61 |/ Assign| this pa|
|00000630| 63 6b 65 74 20 61 20 75 | 6e 69 71 75 65 20 76 61 |cket a u|nique va|
|00000640| 6c 75 65 20 66 72 6f 6d | 20 31 20 74 6f 20 31 30 |lue from| 1 to 10|
|00000650| 30 0d 0a 09 43 75 72 72 | 65 6e 74 51 75 65 72 79 |0...Curr|entQuery|
|00000660| 4e 75 6d 2b 2b 3b 0d 0a | 09 69 66 20 28 43 75 72 |Num++;..|.if (Cur|
|00000670| 72 65 6e 74 51 75 65 72 | 79 4e 75 6d 20 3e 20 31 |rentQuer|yNum > 1|
|00000680| 30 30 29 0d 0a 09 09 43 | 75 72 72 65 6e 74 51 75 |00)....C|urrentQu|
|00000690| 65 72 79 4e 75 6d 20 3d | 20 31 3b 0d 0a 09 51 75 |eryNum =| 1;...Qu|
|000006a0| 65 72 79 4e 75 6d 20 3d | 20 43 75 72 72 65 6e 74 |eryNum =| Current|
|000006b0| 51 75 65 72 79 4e 75 6d | 3b 0d 0a 0d 0a 09 51 75 |QueryNum|;.....Qu|
|000006c0| 65 72 79 20 3d 20 54 65 | 78 74 3b 0d 0a 09 69 66 |ery = Te|xt;...if|
|000006d0| 20 28 51 75 65 72 79 20 | 3d 3d 20 22 22 29 09 09 | (Query |== "")..|
|000006e0| 2f 2f 20 49 66 20 74 68 | 65 20 73 74 72 69 6e 67 |// If th|e string|
|000006f0| 20 69 73 20 65 6d 70 74 | 79 2c 20 64 6f 6e 27 74 | is empt|y, don't|
|00000700| 20 70 61 72 73 65 20 69 | 74 0d 0a 09 09 51 75 65 | parse i|t....Que|
|00000710| 72 79 52 65 6d 61 69 6e | 69 6e 67 20 3d 20 66 61 |ryRemain|ing = fa|
|00000720| 6c 73 65 3b 0d 0a 09 65 | 6c 73 65 0d 0a 09 09 51 |lse;...e|lse....Q|
|00000730| 75 65 72 79 52 65 6d 61 | 69 6e 69 6e 67 20 3d 20 |ueryRema|ining = |
|00000740| 74 72 75 65 3b 0d 0a 09 | 0d 0a 09 77 68 69 6c 65 |true;...|...while|
|00000750| 20 28 51 75 65 72 79 52 | 65 6d 61 69 6e 69 6e 67 | (QueryR|emaining|
|00000760| 29 20 7b 0d 0a 09 09 51 | 75 65 72 79 20 3d 20 50 |) {....Q|uery = P|
|00000770| 61 72 73 65 51 75 65 72 | 79 28 41 64 64 72 2c 20 |arseQuer|y(Addr, |
|00000780| 51 75 65 72 79 2c 20 51 | 75 65 72 79 4e 75 6d 2c |Query, Q|ueryNum,|
|00000790| 20 50 61 63 6b 65 74 4e | 75 6d 29 3b 0d 0a 09 09 | PacketN|um);....|
|000007a0| 69 66 20 28 51 75 65 72 | 79 20 3d 3d 20 22 22 29 |if (Quer|y == "")|
|000007b0| 0d 0a 09 09 09 51 75 65 | 72 79 52 65 6d 61 69 6e |.....Que|ryRemain|
|000007c0| 69 6e 67 20 3d 20 66 61 | 6c 73 65 3b 0d 0a 09 09 |ing = fa|lse;....|
|000007d0| 65 6c 73 65 0d 0a 09 09 | 09 51 75 65 72 79 52 65 |else....|.QueryRe|
|000007e0| 6d 61 69 6e 69 6e 67 20 | 3d 20 74 72 75 65 3b 0d |maining |= true;.|
|000007f0| 0a 09 7d 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |..}..}..|..functi|
|00000800| 6f 6e 20 62 6f 6f 6c 20 | 50 61 72 73 65 4e 65 78 |on bool |ParseNex|
|00000810| 74 51 75 65 72 79 28 20 | 73 74 72 69 6e 67 20 51 |tQuery( |string Q|
|00000820| 75 65 72 79 2c 20 6f 75 | 74 20 73 74 72 69 6e 67 |uery, ou|t string|
|00000830| 20 51 75 65 72 79 54 79 | 70 65 2c 20 6f 75 74 20 | QueryTy|pe, out |
|00000840| 73 74 72 69 6e 67 20 51 | 75 65 72 79 56 61 6c 75 |string Q|ueryValu|
|00000850| 65 2c 20 6f 75 74 20 73 | 74 72 69 6e 67 20 51 75 |e, out s|tring Qu|
|00000860| 65 72 79 52 65 73 74 2c | 20 6f 75 74 20 73 74 72 |eryRest,| out str|
|00000870| 69 6e 67 20 46 69 6e 61 | 6c 50 61 63 6b 65 74 20 |ing Fina|lPacket |
|00000880| 29 0d 0a 7b 0d 0a 09 6c | 6f 63 61 6c 20 73 74 72 |)..{...l|ocal str|
|00000890| 69 6e 67 20 54 65 6d 70 | 51 75 65 72 79 3b 0d 0a |ing Temp|Query;..|
|000008a0| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 43 6c 6f 73 69 |.local i|nt Closi|
|000008b0| 6e 67 53 6c 61 73 68 3b | 0d 0a 0d 0a 09 69 66 20 |ngSlash;|.....if |
|000008c0| 28 51 75 65 72 79 20 3d | 3d 20 22 22 29 0d 0a 09 |(Query =|= "")...|
|000008d0| 09 72 65 74 75 72 6e 20 | 66 61 6c 73 65 3b 0d 0a |.return |false;..|
|000008e0| 0d 0a 09 2f 2f 20 51 75 | 65 72 79 20 73 68 6f 75 |...// Qu|ery shou|
|000008f0| 6c 64 20 62 65 3a 0d 0a | 09 2f 2f 20 20 20 5c 5b |ld be:..|.// \[|
|00000900| 74 79 70 65 5d 5c 3c 76 | 61 6c 75 65 3e 0d 0a 09 |type]\<v|alue>...|
|00000910| 69 66 20 28 4c 65 66 74 | 28 51 75 65 72 79 2c 20 |if (Left|(Query, |
|00000920| 31 29 20 3d 3d 20 22 5c | 5c 22 29 0d 0a 09 7b 0d |1) == "\|\")...{.|
|00000930| 0a 09 09 2f 2f 20 43 68 | 65 63 6b 20 74 6f 20 73 |...// Ch|eck to s|
|00000940| 65 65 20 69 66 20 63 6c | 6f 73 65 64 2e 0d 0a 09 |ee if cl|osed....|
|00000950| 09 43 6c 6f 73 69 6e 67 | 53 6c 61 73 68 20 3d 20 |.Closing|Slash = |
|00000960| 49 6e 53 74 72 28 52 69 | 67 68 74 28 51 75 65 72 |InStr(Ri|ght(Quer|
|00000970| 79 2c 20 4c 65 6e 28 51 | 75 65 72 79 29 2d 31 29 |y, Len(Q|uery)-1)|
|00000980| 2c 20 22 5c 5c 22 29 3b | 0d 0a 09 09 69 66 20 28 |, "\\");|....if (|
|00000990| 43 6c 6f 73 69 6e 67 53 | 6c 61 73 68 20 3d 3d 20 |ClosingS|lash == |
|000009a0| 30 29 0d 0a 09 09 09 72 | 65 74 75 72 6e 20 66 61 |0).....r|eturn fa|
|000009b0| 6c 73 65 3b 0d 0a 0d 0a | 09 09 54 65 6d 70 51 75 |lse;....|..TempQu|
|000009c0| 65 72 79 20 3d 20 51 75 | 65 72 79 3b 0d 0a 0d 0a |ery = Qu|ery;....|
|000009d0| 09 09 2f 2f 20 51 75 65 | 72 79 20 6c 6f 6f 6b 73 |..// Que|ry looks|
|000009e0| 20 6c 69 6b 65 3a 0d 0a | 09 09 2f 2f 20 20 5c 5b | like:..|..// \[|
|000009f0| 74 79 70 65 5d 5c 0d 0a | 09 09 51 75 65 72 79 54 |type]\..|..QueryT|
|00000a00| 79 70 65 20 3d 20 52 69 | 67 68 74 28 51 75 65 72 |ype = Ri|ght(Quer|
|00000a10| 79 2c 20 4c 65 6e 28 51 | 75 65 72 79 29 2d 31 29 |y, Len(Q|uery)-1)|
|00000a20| 3b 0d 0a 09 09 51 75 65 | 72 79 54 79 70 65 20 3d |;....Que|ryType =|
|00000a30| 20 4c 65 66 74 28 51 75 | 65 72 79 54 79 70 65 2c | Left(Qu|eryType,|
|00000a40| 20 43 6c 6f 73 69 6e 67 | 53 6c 61 73 68 29 3b 0d | Closing|Slash);.|
|00000a50| 0a 0d 0a 09 09 51 75 65 | 72 79 52 65 73 74 20 3d |.....Que|ryRest =|
|00000a60| 20 52 69 67 68 74 28 51 | 75 65 72 79 2c 20 4c 65 | Right(Q|uery, Le|
|00000a70| 6e 28 51 75 65 72 79 29 | 20 2d 20 28 4c 65 6e 28 |n(Query)| - (Len(|
|00000a80| 51 75 65 72 79 54 79 70 | 65 29 20 2b 20 32 29 29 |QueryTyp|e) + 2))|
|00000a90| 3b 0d 0a 0d 0a 09 09 69 | 66 20 28 28 51 75 65 72 |;......i|f ((Quer|
|00000aa0| 79 52 65 73 74 20 3d 3d | 20 22 22 29 20 7c 7c 20 |yRest ==| "") || |
|00000ab0| 28 4c 65 6e 28 51 75 65 | 72 79 52 65 73 74 29 20 |(Len(Que|ryRest) |
|00000ac0| 3d 3d 20 31 29 29 0d 0a | 09 09 7b 0d 0a 09 09 09 |== 1))..|..{.....|
|00000ad0| 46 69 6e 61 6c 50 61 63 | 6b 65 74 20 3d 20 22 66 |FinalPac|ket = "f|
|00000ae0| 69 6e 61 6c 22 3b 0d 0a | 09 09 09 72 65 74 75 72 |inal";..|...retur|
|00000af0| 6e 20 74 72 75 65 3b 0d | 0a 09 09 7d 20 65 6c 73 |n true;.|...} els|
|00000b00| 65 20 69 66 20 28 4c 65 | 66 74 28 51 75 65 72 79 |e if (Le|ft(Query|
|00000b10| 52 65 73 74 2c 20 31 29 | 20 3d 3d 20 22 5c 5c 22 |Rest, 1)| == "\\"|
|00000b20| 29 0d 0a 09 09 09 72 65 | 74 75 72 6e 20 74 72 75 |).....re|turn tru|
|00000b30| 65 3b 09 2f 2f 20 5c 74 | 79 70 65 5c 5c 0d 0a 0d |e;.// \t|ype\\...|
|00000b40| 0a 09 09 2f 2f 20 51 75 | 65 72 79 20 6c 6f 6f 6b |...// Qu|ery look|
|00000b50| 73 20 6c 69 6b 65 3a 0d | 0a 09 09 2f 2f 20 20 5c |s like:.|...// \|
|00000b60| 74 79 70 65 5c 76 61 6c | 75 65 0d 0a 09 09 43 6c |type\val|ue....Cl|
|00000b70| 6f 73 69 6e 67 53 6c 61 | 73 68 20 3d 20 49 6e 53 |osingSla|sh = InS|
|00000b80| 74 72 28 51 75 65 72 79 | 52 65 73 74 2c 20 22 5c |tr(Query|Rest, "\|
|00000b90| 5c 22 29 3b 0d 0a 09 09 | 69 66 20 28 43 6c 6f 73 |\");....|if (Clos|
|00000ba0| 69 6e 67 53 6c 61 73 68 | 20 3e 3d 20 30 29 0d 0a |ingSlash| >= 0)..|
|00000bb0| 09 09 09 51 75 65 72 79 | 56 61 6c 75 65 20 3d 20 |...Query|Value = |
|00000bc0| 4c 65 66 74 28 51 75 65 | 72 79 52 65 73 74 2c 20 |Left(Que|ryRest, |
|00000bd0| 43 6c 6f 73 69 6e 67 53 | 6c 61 73 68 29 3b 0d 0a |ClosingS|lash);..|
|00000be0| 09 09 65 6c 73 65 0d 0a | 09 09 09 51 75 65 72 79 |..else..|...Query|
|00000bf0| 56 61 6c 75 65 20 3d 20 | 51 75 65 72 79 52 65 73 |Value = |QueryRes|
|00000c00| 74 3b 0d 0a 0d 0a 09 09 | 51 75 65 72 79 52 65 73 |t;......|QueryRes|
|00000c10| 74 20 3d 20 52 69 67 68 | 74 28 51 75 65 72 79 2c |t = Righ|t(Query,|
|00000c20| 20 4c 65 6e 28 51 75 65 | 72 79 29 20 2d 20 28 4c | Len(Que|ry) - (L|
|00000c30| 65 6e 28 51 75 65 72 79 | 54 79 70 65 29 20 2b 20 |en(Query|Type) + |
|00000c40| 4c 65 6e 28 51 75 65 72 | 79 56 61 6c 75 65 29 20 |Len(Quer|yValue) |
|00000c50| 2b 20 33 29 29 3b 0d 0a | 09 09 69 66 20 28 51 75 |+ 3));..|..if (Qu|
|00000c60| 65 72 79 52 65 73 74 20 | 3d 3d 20 22 22 29 0d 0a |eryRest |== "")..|
|00000c70| 09 09 7b 0d 0a 09 09 09 | 46 69 6e 61 6c 50 61 63 |..{.....|FinalPac|
|00000c80| 6b 65 74 20 3d 20 22 66 | 69 6e 61 6c 22 3b 0d 0a |ket = "f|inal";..|
|00000c90| 09 09 09 72 65 74 75 72 | 6e 20 74 72 75 65 3b 0d |...retur|n true;.|
|00000ca0| 0a 09 09 7d 20 65 6c 73 | 65 0d 0a 09 09 09 72 65 |...} els|e.....re|
|00000cb0| 74 75 72 6e 20 74 72 75 | 65 3b 0d 0a 09 7d 20 65 |turn tru|e;...} e|
|00000cc0| 6c 73 65 20 7b 0d 0a 09 | 09 72 65 74 75 72 6e 20 |lse {...|.return |
|00000cd0| 66 61 6c 73 65 3b 0d 0a | 09 7d 0d 0a 7d 0d 0a 0d |false;..|.}..}...|
|00000ce0| 0a 66 75 6e 63 74 69 6f | 6e 20 73 74 72 69 6e 67 |.functio|n string|
|00000cf0| 20 50 61 72 73 65 51 75 | 65 72 79 28 20 49 70 41 | ParseQu|ery( IpA|
|00000d00| 64 64 72 20 41 64 64 72 | 2c 20 63 6f 65 72 63 65 |ddr Addr|, coerce|
|00000d10| 20 73 74 72 69 6e 67 20 | 51 75 65 72 79 2c 20 69 | string |Query, i|
|00000d20| 6e 74 20 51 75 65 72 79 | 4e 75 6d 2c 20 6f 75 74 |nt Query|Num, out|
|00000d30| 20 69 6e 74 20 50 61 63 | 6b 65 74 4e 75 6d 20 29 | int Pac|ketNum )|
|00000d40| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 73 74 72 69 |..{...lo|cal stri|
|00000d50| 6e 67 20 51 75 65 72 79 | 54 79 70 65 2c 20 51 75 |ng Query|Type, Qu|
|00000d60| 65 72 79 56 61 6c 75 65 | 2c 20 51 75 65 72 79 52 |eryValue|, QueryR|
|00000d70| 65 73 74 2c 20 56 61 6c | 69 64 61 74 69 6f 6e 53 |est, Val|idationS|
|00000d80| 74 72 69 6e 67 3b 0d 0a | 09 6c 6f 63 61 6c 20 62 |tring;..|.local b|
|00000d90| 6f 6f 6c 20 52 65 73 75 | 6c 74 3b 0d 0a 09 6c 6f |ool Resu|lt;...lo|
|00000da0| 63 61 6c 20 73 74 72 69 | 6e 67 20 46 69 6e 61 6c |cal stri|ng Final|
|00000db0| 50 61 63 6b 65 74 3b 0d | 0a 09 0d 0a 09 52 65 73 |Packet;.|.....Res|
|00000dc0| 75 6c 74 20 3d 20 50 61 | 72 73 65 4e 65 78 74 51 |ult = Pa|rseNextQ|
|00000dd0| 75 65 72 79 28 51 75 65 | 72 79 2c 20 51 75 65 72 |uery(Que|ry, Quer|
|00000de0| 79 54 79 70 65 2c 20 51 | 75 65 72 79 56 61 6c 75 |yType, Q|ueryValu|
|00000df0| 65 2c 20 51 75 65 72 79 | 52 65 73 74 2c 20 46 69 |e, Query|Rest, Fi|
|00000e00| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 69 66 |nalPacke|t);...if|
|00000e10| 28 20 21 52 65 73 75 6c | 74 20 29 0d 0a 09 09 72 |( !Resul|t )....r|
|00000e20| 65 74 75 72 6e 20 22 22 | 3b 0d 0a 0d 0a 09 69 66 |eturn ""|;.....if|
|00000e30| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 62 61 |( QueryT|ype=="ba|
|00000e40| 73 69 63 22 20 29 0d 0a | 09 7b 0d 0a 09 09 52 65 |sic" )..|.{....Re|
|00000e50| 73 75 6c 74 20 3d 20 53 | 65 6e 64 51 75 65 72 79 |sult = S|endQuery|
|00000e60| 50 61 63 6b 65 74 28 41 | 64 64 72 2c 20 47 65 74 |Packet(A|ddr, Get|
|00000e70| 42 61 73 69 63 28 29 2c | 20 51 75 65 72 79 4e 75 |Basic(),| QueryNu|
|00000e80| 6d 2c 20 2b 2b 50 61 63 | 6b 65 74 4e 75 6d 2c 20 |m, ++Pac|ketNum, |
|00000e90| 46 69 6e 61 6c 50 61 63 | 6b 65 74 29 3b 0d 0a 09 |FinalPac|ket);...|
|00000ea0| 7d 0d 0a 09 65 6c 73 65 | 20 69 66 28 20 51 75 65 |}...else| if( Que|
|00000eb0| 72 79 54 79 70 65 3d 3d | 22 69 6e 66 6f 22 20 29 |ryType==|"info" )|
|00000ec0| 0d 0a 09 7b 0d 0a 09 09 | 52 65 73 75 6c 74 20 3d |...{....|Result =|
|00000ed0| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00000ee0| 28 41 64 64 72 2c 20 47 | 65 74 49 6e 66 6f 28 29 |(Addr, G|etInfo()|
|00000ef0| 2c 20 51 75 65 72 79 4e | 75 6d 2c 20 2b 2b 50 61 |, QueryN|um, ++Pa|
|00000f00| 63 6b 65 74 4e 75 6d 2c | 20 46 69 6e 61 6c 50 61 |cketNum,| FinalPa|
|00000f10| 63 6b 65 74 29 3b 0d 0a | 09 7d 0d 0a 09 65 6c 73 |cket);..|.}...els|
|00000f20| 65 20 69 66 28 20 51 75 | 65 72 79 54 79 70 65 3d |e if( Qu|eryType=|
|00000f30| 3d 22 72 75 6c 65 73 22 | 20 29 0d 0a 09 7b 0d 0a |="rules"| )...{..|
|00000f40| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 51 |..Result| = SendQ|
|00000f50| 75 65 72 79 50 61 63 6b | 65 74 28 41 64 64 72 2c |ueryPack|et(Addr,|
|00000f60| 20 47 65 74 52 75 6c 65 | 73 28 29 2c 20 51 75 65 | GetRule|s(), Que|
|00000f70| 72 79 4e 75 6d 2c 20 2b | 2b 50 61 63 6b 65 74 4e |ryNum, +|+PacketN|
|00000f80| 75 6d 2c 20 46 69 6e 61 | 6c 50 61 63 6b 65 74 29 |um, Fina|lPacket)|
|00000f90| 3b 0d 0a 09 7d 0d 0a 09 | 65 6c 73 65 20 69 66 28 |;...}...|else if(|
|00000fa0| 20 51 75 65 72 79 54 79 | 70 65 3d 3d 22 70 6c 61 | QueryTy|pe=="pla|
|00000fb0| 79 65 72 73 22 20 29 0d | 0a 09 7b 0d 0a 09 09 69 |yers" ).|..{....i|
|00000fc0| 66 28 20 4c 65 76 65 6c | 2e 47 61 6d 65 2e 4e 75 |f( Level|.Game.Nu|
|00000fd0| 6d 50 6c 61 79 65 72 73 | 20 3e 20 30 20 29 0d 0a |mPlayers| > 0 )..|
|00000fe0| 09 09 09 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...Resul|t = Send|
|00000ff0| 50 6c 61 79 65 72 73 28 | 41 64 64 72 2c 20 51 75 |Players(|Addr, Qu|
|00001000| 65 72 79 4e 75 6d 2c 20 | 50 61 63 6b 65 74 4e 75 |eryNum, |PacketNu|
|00001010| 6d 2c 20 46 69 6e 61 6c | 50 61 63 6b 65 74 29 3b |m, Final|Packet);|
|00001020| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 09 52 65 73 |....else|.....Res|
|00001030| 75 6c 74 20 3d 20 53 65 | 6e 64 51 75 65 72 79 50 |ult = Se|ndQueryP|
|00001040| 61 63 6b 65 74 28 41 64 | 64 72 2c 20 22 22 2c 20 |acket(Ad|dr, "", |
|00001050| 51 75 65 72 79 4e 75 6d | 2c 20 50 61 63 6b 65 74 |QueryNum|, Packet|
|00001060| 4e 75 6d 2c 20 46 69 6e | 61 6c 50 61 63 6b 65 74 |Num, Fin|alPacket|
|00001070| 29 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 20 69 66 |);...}..|.else if|
|00001080| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 73 74 |( QueryT|ype=="st|
|00001090| 61 74 75 73 22 20 29 0d | 0a 09 7b 0d 0a 09 09 52 |atus" ).|..{....R|
|000010a0| 65 73 75 6c 74 20 3d 20 | 53 65 6e 64 51 75 65 72 |esult = |SendQuer|
|000010b0| 79 50 61 63 6b 65 74 28 | 41 64 64 72 2c 20 47 65 |yPacket(|Addr, Ge|
|000010c0| 74 42 61 73 69 63 28 29 | 2c 20 51 75 65 72 79 4e |tBasic()|, QueryN|
|000010d0| 75 6d 2c 20 2b 2b 50 61 | 63 6b 65 74 4e 75 6d 2c |um, ++Pa|cketNum,|
|000010e0| 20 22 22 29 3b 0d 0a 09 | 09 52 65 73 75 6c 74 20 | "");...|.Result |
|000010f0| 3d 20 53 65 6e 64 51 75 | 65 72 79 50 61 63 6b 65 |= SendQu|eryPacke|
|00001100| 74 28 41 64 64 72 2c 20 | 47 65 74 49 6e 66 6f 28 |t(Addr, |GetInfo(|
|00001110| 29 2c 20 51 75 65 72 79 | 4e 75 6d 2c 20 2b 2b 50 |), Query|Num, ++P|
|00001120| 61 63 6b 65 74 4e 75 6d | 2c 20 22 22 29 3b 0d 0a |acketNum|, "");..|
|00001130| 09 09 69 66 28 20 4c 65 | 76 65 6c 2e 47 61 6d 65 |..if( Le|vel.Game|
|00001140| 2e 4e 75 6d 50 6c 61 79 | 65 72 73 20 3d 3d 20 30 |.NumPlay|ers == 0|
|00001150| 20 29 0d 0a 09 09 7b 0d | 0a 09 09 09 52 65 73 75 | )....{.|....Resu|
|00001160| 6c 74 20 3d 20 53 65 6e | 64 51 75 65 72 79 50 61 |lt = Sen|dQueryPa|
|00001170| 63 6b 65 74 28 41 64 64 | 72 2c 20 47 65 74 52 75 |cket(Add|r, GetRu|
|00001180| 6c 65 73 28 29 2c 20 51 | 75 65 72 79 4e 75 6d 2c |les(), Q|ueryNum,|
|00001190| 20 2b 2b 50 61 63 6b 65 | 74 4e 75 6d 2c 20 46 69 | ++Packe|tNum, Fi|
|000011a0| 6e 61 6c 50 61 63 6b 65 | 74 29 3b 0d 0a 09 09 7d |nalPacke|t);....}|
|000011b0| 0d 0a 09 09 65 6c 73 65 | 0d 0a 09 09 7b 0d 0a 09 |....else|....{...|
|000011c0| 09 09 52 65 73 75 6c 74 | 20 3d 20 53 65 6e 64 51 |..Result| = SendQ|
|000011d0| 75 65 72 79 50 61 63 6b | 65 74 28 41 64 64 72 2c |ueryPack|et(Addr,|
|000011e0| 20 47 65 74 52 75 6c 65 | 73 28 29 2c 20 51 75 65 | GetRule|s(), Que|
|000011f0| 72 79 4e 75 6d 2c 20 2b | 2b 50 61 63 6b 65 74 4e |ryNum, +|+PacketN|
|00001200| 75 6d 2c 20 22 22 29 3b | 0d 0a 09 09 09 52 65 73 |um, "");|.....Res|
|00001210| 75 6c 74 20 3d 20 53 65 | 6e 64 50 6c 61 79 65 72 |ult = Se|ndPlayer|
|00001220| 73 28 41 64 64 72 2c 20 | 51 75 65 72 79 4e 75 6d |s(Addr, |QueryNum|
|00001230| 2c 20 50 61 63 6b 65 74 | 4e 75 6d 2c 20 46 69 6e |, Packet|Num, Fin|
|00001240| 61 6c 50 61 63 6b 65 74 | 29 3b 0d 0a 09 09 7d 0d |alPacket|);....}.|
|00001250| 0a 09 7d 0d 0a 09 65 6c | 73 65 20 69 66 28 20 51 |..}...el|se if( Q|
|00001260| 75 65 72 79 54 79 70 65 | 3d 3d 22 65 63 68 6f 22 |ueryType|=="echo"|
|00001270| 20 29 0d 0a 09 7b 0d 0a | 09 09 2f 2f 20 52 65 73 | )...{..|..// Res|
|00001280| 70 6f 6e 64 20 74 6f 20 | 61 6e 20 65 63 68 6f 20 |pond to |an echo |
|00001290| 77 69 74 68 20 74 68 65 | 20 73 61 6d 65 20 73 74 |with the| same st|
|000012a0| 72 69 6e 67 0d 0a 09 09 | 52 65 73 75 6c 74 20 3d |ring....|Result =|
|000012b0| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|000012c0| 28 41 64 64 72 2c 20 22 | 5c 5c 65 63 68 6f 5c 5c |(Addr, "|\\echo\\|
|000012d0| 22 24 51 75 65 72 79 56 | 61 6c 75 65 2c 20 51 75 |"$QueryV|alue, Qu|
|000012e0| 65 72 79 4e 75 6d 2c 20 | 2b 2b 50 61 63 6b 65 74 |eryNum, |++Packet|
|000012f0| 4e 75 6d 2c 20 46 69 6e | 61 6c 50 61 63 6b 65 74 |Num, Fin|alPacket|
|00001300| 29 3b 0d 0a 09 7d 0d 0a | 09 65 6c 73 65 20 69 66 |);...}..|.else if|
|00001310| 28 20 51 75 65 72 79 54 | 79 70 65 3d 3d 22 73 65 |( QueryT|ype=="se|
|00001320| 63 75 72 65 22 20 29 0d | 0a 09 7b 0d 0a 09 09 56 |cure" ).|..{....V|
|00001330| 61 6c 69 64 61 74 69 6f | 6e 53 74 72 69 6e 67 20 |alidatio|nString |
|00001340| 3d 20 22 5c 5c 76 61 6c | 69 64 61 74 65 5c 5c 22 |= "\\val|idate\\"|
|00001350| 24 56 61 6c 69 64 61 74 | 65 28 51 75 65 72 79 56 |$Validat|e(QueryV|
|00001360| 61 6c 75 65 2c 20 47 61 | 6d 65 4e 61 6d 65 29 3b |alue, Ga|meName);|
|00001370| 0d 0a 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|00001380| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|00001390| 72 2c 20 56 61 6c 69 64 | 61 74 69 6f 6e 53 74 72 |r, Valid|ationStr|
|000013a0| 69 6e 67 2c 20 51 75 65 | 72 79 4e 75 6d 2c 20 2b |ing, Que|ryNum, +|
|000013b0| 2b 50 61 63 6b 65 74 4e | 75 6d 2c 20 46 69 6e 61 |+PacketN|um, Fina|
|000013c0| 6c 50 61 63 6b 65 74 29 | 3b 0d 0a 09 7d 0d 0a 09 |lPacket)|;...}...|
|000013d0| 65 6c 73 65 20 69 66 28 | 20 51 75 65 72 79 54 79 |else if(| QueryTy|
|000013e0| 70 65 3d 3d 22 6c 65 76 | 65 6c 5f 70 72 6f 70 65 |pe=="lev|el_prope|
|000013f0| 72 74 79 22 20 29 0d 0a | 09 7b 0d 0a 09 09 52 65 |rty" )..|.{....Re|
|00001400| 73 75 6c 74 20 3d 20 53 | 65 6e 64 51 75 65 72 79 |sult = S|endQuery|
|00001410| 50 61 63 6b 65 74 28 41 | 64 64 72 2c 20 47 65 74 |Packet(A|ddr, Get|
|00001420| 4c 65 76 65 6c 50 72 6f | 70 65 72 74 79 28 51 75 |LevelPro|perty(Qu|
|00001430| 65 72 79 56 61 6c 75 65 | 29 2c 20 51 75 65 72 79 |eryValue|), Query|
|00001440| 4e 75 6d 2c 20 2b 2b 50 | 61 63 6b 65 74 4e 75 6d |Num, ++P|acketNum|
|00001450| 2c 20 46 69 6e 61 6c 50 | 61 63 6b 65 74 29 3b 0d |, FinalP|acket);.|
|00001460| 0a 09 7d 0d 0a 09 65 6c | 73 65 20 69 66 28 20 51 |..}...el|se if( Q|
|00001470| 75 65 72 79 54 79 70 65 | 3d 3d 22 67 61 6d 65 5f |ueryType|=="game_|
|00001480| 70 72 6f 70 65 72 74 79 | 22 20 29 0d 0a 09 7b 0d |property|" )...{.|
|00001490| 0a 09 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|000014a0| 64 51 75 65 72 79 50 61 | 63 6b 65 74 28 41 64 64 |dQueryPa|cket(Add|
|000014b0| 72 2c 20 47 65 74 47 61 | 6d 65 50 72 6f 70 65 72 |r, GetGa|meProper|
|000014c0| 74 79 28 51 75 65 72 79 | 56 61 6c 75 65 29 2c 20 |ty(Query|Value), |
|000014d0| 51 75 65 72 79 4e 75 6d | 2c 20 2b 2b 50 61 63 6b |QueryNum|, ++Pack|
|000014e0| 65 74 4e 75 6d 2c 20 46 | 69 6e 61 6c 50 61 63 6b |etNum, F|inalPack|
|000014f0| 65 74 29 3b 0d 0a 09 7d | 0d 0a 09 65 6c 73 65 20 |et);...}|...else |
|00001500| 69 66 28 20 51 75 65 72 | 79 54 79 70 65 3d 3d 22 |if( Quer|yType=="|
|00001510| 70 6c 61 79 65 72 5f 70 | 72 6f 70 65 72 74 79 22 |player_p|roperty"|
|00001520| 20 29 0d 0a 09 7b 0d 0a | 09 09 52 65 73 75 6c 74 | )...{..|..Result|
|00001530| 20 3d 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b | = SendQ|ueryPack|
|00001540| 65 74 28 41 64 64 72 2c | 20 47 65 74 50 6c 61 79 |et(Addr,| GetPlay|
|00001550| 65 72 50 72 6f 70 65 72 | 74 79 28 51 75 65 72 79 |erProper|ty(Query|
|00001560| 56 61 6c 75 65 29 2c 20 | 51 75 65 72 79 4e 75 6d |Value), |QueryNum|
|00001570| 2c 20 2b 2b 50 61 63 6b | 65 74 4e 75 6d 2c 20 46 |, ++Pack|etNum, F|
|00001580| 69 6e 61 6c 50 61 63 6b | 65 74 29 3b 0d 0a 09 7d |inalPack|et);...}|
|00001590| 0d 0a 09 65 6c 73 65 0d | 0a 09 7b 0d 0a 09 09 4c |...else.|..{....L|
|000015a0| 6f 67 28 22 55 64 70 53 | 65 72 76 65 72 51 75 65 |og("UdpS|erverQue|
|000015b0| 72 79 3a 20 55 6e 6b 6e | 6f 77 6e 20 71 75 65 72 |ry: Unkn|own quer|
|000015c0| 79 3a 20 22 24 51 75 65 | 72 79 54 79 70 65 29 3b |y: "$Que|ryType);|
|000015d0| 0d 0a 09 7d 0d 0a 09 69 | 66 28 20 21 52 65 73 75 |...}...i|f( !Resu|
|000015e0| 6c 74 20 29 0d 0a 09 09 | 4c 6f 67 28 22 55 64 70 |lt )....|Log("Udp|
|000015f0| 53 65 72 76 65 72 51 75 | 65 72 79 3a 20 45 72 72 |ServerQu|ery: Err|
|00001600| 6f 72 20 72 65 73 70 6f | 6e 64 69 6e 67 20 74 6f |or respo|nding to|
|00001610| 20 71 75 65 72 79 2e 22 | 29 3b 0d 0a 09 72 65 74 | query."|);...ret|
|00001620| 75 72 6e 20 51 75 65 72 | 79 52 65 73 74 3b 0d 0a |urn Quer|yRest;..|
|00001630| 7d 0d 0a 0d 0a 2f 2f 20 | 53 65 6e 64 51 75 65 72 |}....// |SendQuer|
|00001640| 79 50 61 63 6b 65 74 20 | 69 73 20 61 20 77 72 61 |yPacket |is a wra|
|00001650| 70 70 65 72 20 66 6f 72 | 20 53 65 6e 64 54 65 78 |pper for| SendTex|
|00001660| 74 20 74 68 61 74 20 61 | 6c 6c 6f 77 73 20 66 6f |t that a|llows fo|
|00001670| 72 20 70 61 63 6b 65 74 | 20 6e 75 6d 62 65 72 69 |r packet| numberi|
|00001680| 6e 67 2e 0d 0a 66 75 6e | 63 74 69 6f 6e 20 62 6f |ng...fun|ction bo|
|00001690| 6f 6c 20 53 65 6e 64 51 | 75 65 72 79 50 61 63 6b |ol SendQ|ueryPack|
|000016a0| 65 74 28 49 70 41 64 64 | 72 20 41 64 64 72 2c 20 |et(IpAdd|r Addr, |
|000016b0| 63 6f 65 72 63 65 20 73 | 74 72 69 6e 67 20 53 65 |coerce s|tring Se|
|000016c0| 6e 64 53 74 72 69 6e 67 | 2c 20 69 6e 74 20 51 75 |ndString|, int Qu|
|000016d0| 65 72 79 4e 75 6d 2c 20 | 69 6e 74 20 50 61 63 6b |eryNum, |int Pack|
|000016e0| 65 74 4e 75 6d 2c 20 73 | 74 72 69 6e 67 20 46 69 |etNum, s|tring Fi|
|000016f0| 6e 61 6c 50 61 63 6b 65 | 74 29 0d 0a 7b 0d 0a 09 |nalPacke|t)..{...|
|00001700| 6c 6f 63 61 6c 20 62 6f | 6f 6c 20 52 65 73 75 6c |local bo|ol Resul|
|00001710| 74 3b 0d 0a 09 69 66 20 | 28 46 69 6e 61 6c 50 61 |t;...if |(FinalPa|
|00001720| 63 6b 65 74 20 3d 3d 20 | 22 66 69 6e 61 6c 22 29 |cket == |"final")|
|00001730| 20 7b 0d 0a 09 09 53 65 | 6e 64 53 74 72 69 6e 67 | {....Se|ndString|
|00001740| 20 3d 20 53 65 6e 64 53 | 74 72 69 6e 67 24 22 5c | = SendS|tring$"\|
|00001750| 5c 66 69 6e 61 6c 5c 5c | 22 3b 0d 0a 09 7d 0d 0a |\final\\|";...}..|
|00001760| 09 53 65 6e 64 53 74 72 | 69 6e 67 20 3d 20 53 65 |.SendStr|ing = Se|
|00001770| 6e 64 53 74 72 69 6e 67 | 24 22 5c 5c 71 75 65 72 |ndString|$"\\quer|
|00001780| 79 69 64 5c 5c 22 24 51 | 75 65 72 79 4e 75 6d 24 |yid\\"$Q|ueryNum$|
|00001790| 22 2e 22 24 50 61 63 6b | 65 74 4e 75 6d 3b 0d 0a |"."$Pack|etNum;..|
|000017a0| 0d 0a 09 52 65 73 75 6c | 74 20 3d 20 53 65 6e 64 |...Resul|t = Send|
|000017b0| 54 65 78 74 28 41 64 64 | 72 2c 20 53 65 6e 64 53 |Text(Add|r, SendS|
|000017c0| 74 72 69 6e 67 29 3b 0d | 0a 0d 0a 09 72 65 74 75 |tring);.|....retu|
|000017d0| 72 6e 20 52 65 73 75 6c | 74 3b 0d 0a 7d 0d 0a 0d |rn Resul|t;..}...|
|000017e0| 0a 2f 2f 20 52 65 74 75 | 72 6e 20 61 20 73 74 72 |.// Retu|rn a str|
|000017f0| 69 6e 67 20 6f 66 20 62 | 61 73 69 63 20 69 6e 66 |ing of b|asic inf|
|00001800| 6f 72 6d 61 74 69 6f 6e | 2e 0d 0a 66 75 6e 63 74 |ormation|...funct|
|00001810| 69 6f 6e 20 73 74 72 69 | 6e 67 20 47 65 74 42 61 |ion stri|ng GetBa|
|00001820| 73 69 63 28 29 20 7b 0d | 0a 09 6c 6f 63 61 6c 20 |sic() {.|..local |
|00001830| 73 74 72 69 6e 67 20 52 | 65 73 75 6c 74 53 65 74 |string R|esultSet|
|00001840| 3b 0d 0a 0d 0a 09 2f 2f | 20 54 68 65 20 6e 61 6d |;.....//| The nam|
|00001850| 65 20 6f 66 20 74 68 69 | 73 20 67 61 6d 65 2e 0d |e of thi|s game..|
|00001860| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 22 5c |..Result|Set = "\|
|00001870| 5c 67 61 6d 65 6e 61 6d | 65 5c 5c 22 24 47 61 6d |\gamenam|e\\"$Gam|
|00001880| 65 4e 61 6d 65 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |eName;..|...// Th|
|00001890| 65 20 76 65 72 73 69 6f | 6e 20 6f 66 20 74 68 69 |e versio|n of thi|
|000018a0| 73 20 67 61 6d 65 2e 0d | 0a 09 52 65 73 75 6c 74 |s game..|..Result|
|000018b0| 53 65 74 20 3d 20 52 65 | 73 75 6c 74 53 65 74 24 |Set = Re|sultSet$|
|000018c0| 22 5c 5c 67 61 6d 65 76 | 65 72 5c 5c 22 24 4c 65 |"\\gamev|er\\"$Le|
|000018d0| 76 65 6c 2e 45 6e 67 69 | 6e 65 56 65 72 73 69 6f |vel.Engi|neVersio|
|000018e0| 6e 3b 0d 0a 0d 0a 09 2f | 2f 20 54 68 65 20 6d 6f |n;...../|/ The mo|
|000018f0| 73 74 20 72 65 63 65 6e | 74 20 6e 65 74 77 6f 72 |st recen|t networ|
|00001900| 6b 20 63 6f 6d 70 61 74 | 69 62 6c 65 20 76 65 72 |k compat|ible ver|
|00001910| 73 69 6f 6e 2e 0d 0a 09 | 52 65 73 75 6c 74 53 65 |sion....|ResultSe|
|00001920| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00001930| 5c 6d 69 6e 6e 65 74 76 | 65 72 5c 5c 22 24 4c 65 |\minnetv|er\\"$Le|
|00001940| 76 65 6c 2e 4d 69 6e 4e | 65 74 56 65 72 73 69 6f |vel.MinN|etVersio|
|00001950| 6e 3b 0d 0a 0d 0a 09 2f | 2f 20 54 68 65 20 72 65 |n;...../|/ The re|
|00001960| 67 69 6f 6e 61 6c 20 6c | 6f 63 61 74 69 6f 6e 20 |gional l|ocation |
|00001970| 6f 66 20 74 68 69 73 20 | 67 61 6d 65 2e 0d 0a 09 |of this |game....|
|00001980| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001990| 6c 74 53 65 74 24 22 5c | 5c 6c 6f 63 61 74 69 6f |ltSet$"\|\locatio|
|000019a0| 6e 5c 5c 22 24 4c 65 76 | 65 6c 2e 47 61 6d 65 2e |n\\"$Lev|el.Game.|
|000019b0| 47 61 6d 65 52 65 70 6c | 69 63 61 74 69 6f 6e 49 |GameRepl|icationI|
|000019c0| 6e 66 6f 2e 52 65 67 69 | 6f 6e 3b 0d 0a 09 0d 0a |nfo.Regi|on;.....|
|000019d0| 09 72 65 74 75 72 6e 20 | 52 65 73 75 6c 74 53 65 |.return |ResultSe|
|000019e0| 74 3b 0d 0a 7d 0d 0a 0d | 0a 2f 2f 20 52 65 74 75 |t;..}...|.// Retu|
|000019f0| 72 6e 20 61 20 73 74 72 | 69 6e 67 20 6f 66 20 69 |rn a str|ing of i|
|00001a00| 6d 70 6f 72 74 61 6e 74 | 20 73 79 73 74 65 6d 20 |mportant| system |
|00001a10| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 0d 0a 66 75 |informat|ion...fu|
|00001a20| 6e 63 74 69 6f 6e 20 73 | 74 72 69 6e 67 20 47 65 |nction s|tring Ge|
|00001a30| 74 49 6e 66 6f 28 29 20 | 7b 0d 0a 09 6c 6f 63 61 |tInfo() |{...loca|
|00001a40| 6c 20 73 74 72 69 6e 67 | 20 52 65 73 75 6c 74 53 |l string| ResultS|
|00001a50| 65 74 3b 0d 0a 0d 0a 09 | 2f 2f 20 54 68 65 20 73 |et;.....|// The s|
|00001a60| 65 72 76 65 72 20 6e 61 | 6d 65 2c 20 69 2e 65 2e |erver na|me, i.e.|
|00001a70| 3a 20 42 6f 62 92 73 20 | 53 65 72 76 65 72 0d 0a |: Bob.s |Server..|
|00001a80| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 22 5c 5c |.ResultS|et = "\\|
|00001a90| 68 6f 73 74 6e 61 6d 65 | 5c 5c 22 24 4c 65 76 65 |hostname|\\"$Leve|
|00001aa0| 6c 2e 47 61 6d 65 2e 47 | 61 6d 65 52 65 70 6c 69 |l.Game.G|ameRepli|
|00001ab0| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 53 65 72 76 65 |cationIn|fo.Serve|
|00001ac0| 72 4e 61 6d 65 3b 0d 0a | 0d 0a 09 2f 2f 20 54 68 |rName;..|...// Th|
|00001ad0| 65 20 73 68 6f 72 74 20 | 73 65 72 76 65 72 20 6e |e short |server n|
|00001ae0| 61 6d 65 0d 0a 09 2f 2f | 52 65 73 75 6c 74 53 65 |ame...//|ResultSe|
|00001af0| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00001b00| 5c 73 68 6f 72 74 6e 61 | 6d 65 5c 5c 22 24 4c 65 |\shortna|me\\"$Le|
|00001b10| 76 65 6c 2e 47 61 6d 65 | 2e 47 61 6d 65 52 65 70 |vel.Game|.GameRep|
|00001b20| 6c 69 63 61 74 69 6f 6e | 49 6e 66 6f 2e 53 68 6f |lication|Info.Sho|
|00001b30| 72 74 4e 61 6d 65 3b 0d | 0a 0d 0a 09 2f 2f 20 54 |rtName;.|....// T|
|00001b40| 68 65 20 73 65 72 76 65 | 72 20 70 6f 72 74 2e 0d |he serve|r port..|
|00001b50| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00001b60| 73 75 6c 74 53 65 74 24 | 22 5c 5c 68 6f 73 74 70 |sultSet$|"\\hostp|
|00001b70| 6f 72 74 5c 5c 22 24 4c | 65 76 65 6c 2e 47 61 6d |ort\\"$L|evel.Gam|
|00001b80| 65 2e 47 65 74 53 65 72 | 76 65 72 50 6f 72 74 28 |e.GetSer|verPort(|
|00001b90| 29 3b 0d 0a 0d 0a 09 2f | 2f 20 28 6f 70 74 69 6f |);...../|/ (optio|
|00001ba0| 6e 61 6c 29 20 54 68 65 | 20 73 65 72 76 65 72 20 |nal) The| server |
|00001bb0| 49 50 0d 0a 09 2f 2f 20 | 69 66 20 28 53 65 72 76 |IP...// |if (Serv|
|00001bc0| 65 72 49 50 20 21 3d 20 | 22 22 29 0d 0a 09 2f 2f |erIP != |"")...//|
|00001bd0| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 52 65 73 |.ResultS|et = Res|
|00001be0| 75 6c 74 53 65 74 24 22 | 5c 5c 68 6f 73 74 69 70 |ultSet$"|\\hostip|
|00001bf0| 5c 5c 22 24 53 65 72 76 | 65 72 49 50 3b 0d 0a 0d |\\"$Serv|erIP;...|
|00001c00| 0a 09 2f 2f 20 54 68 65 | 20 6d 61 70 2f 6c 65 76 |..// The| map/lev|
|00001c10| 65 6c 20 74 69 74 6c 65 | 0d 0a 09 52 65 73 75 6c |el title|...Resul|
|00001c20| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00001c30| 24 22 5c 5c 6d 61 70 74 | 69 74 6c 65 5c 5c 22 24 |$"\\mapt|itle\\"$|
|00001c40| 4c 65 76 65 6c 2e 54 69 | 74 6c 65 3b 0d 0a 09 0d |Level.Ti|tle;....|
|00001c50| 0a 09 2f 2f 20 4d 61 70 | 20 6e 61 6d 65 0d 0a 09 |..// Map| name...|
|00001c60| 52 65 73 75 6c 74 53 65 | 74 20 3d 20 52 65 73 75 |ResultSe|t = Resu|
|00001c70| 6c 74 53 65 74 24 22 5c | 5c 6d 61 70 6e 61 6d 65 |ltSet$"\|\mapname|
|00001c80| 5c 5c 22 24 4c 65 66 74 | 28 73 74 72 69 6e 67 28 |\\"$Left|(string(|
|00001c90| 4c 65 76 65 6c 29 2c 20 | 49 6e 53 74 72 28 73 74 |Level), |InStr(st|
|00001ca0| 72 69 6e 67 28 4c 65 76 | 65 6c 29 2c 20 22 2e 22 |ring(Lev|el), "."|
|00001cb0| 29 29 3b 0d 0a 0d 0a 09 | 2f 2f 20 54 68 65 20 6d |));.....|// The m|
|00001cc0| 6f 64 20 6f 72 20 67 61 | 6d 65 20 74 79 70 65 0d |od or ga|me type.|
|00001cd0| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00001ce0| 73 75 6c 74 53 65 74 24 | 22 5c 5c 67 61 6d 65 74 |sultSet$|"\\gamet|
|00001cf0| 79 70 65 5c 5c 22 24 47 | 65 74 49 74 65 6d 4e 61 |ype\\"$G|etItemNa|
|00001d00| 6d 65 28 73 74 72 69 6e | 67 28 4c 65 76 65 6c 2e |me(strin|g(Level.|
|00001d10| 47 61 6d 65 2e 43 6c 61 | 73 73 29 29 3b 0d 0a 0d |Game.Cla|ss));...|
|00001d20| 0a 09 2f 2f 20 54 68 65 | 20 6e 75 6d 62 65 72 20 |..// The| number |
|00001d30| 6f 66 20 70 6c 61 79 65 | 72 73 0d 0a 09 52 65 73 |of playe|rs...Res|
|00001d40| 75 6c 74 53 65 74 20 3d | 20 52 65 73 75 6c 74 53 |ultSet =| ResultS|
|00001d50| 65 74 24 22 5c 5c 6e 75 | 6d 70 6c 61 79 65 72 73 |et$"\\nu|mplayers|
|00001d60| 5c 5c 22 24 4c 65 76 65 | 6c 2e 47 61 6d 65 2e 4e |\\"$Leve|l.Game.N|
|00001d70| 75 6d 50 6c 61 79 65 72 | 73 3b 0d 0a 0d 0a 09 2f |umPlayer|s;...../|
|00001d80| 2f 20 54 68 65 20 6d 61 | 78 69 6d 75 6d 20 6e 75 |/ The ma|ximum nu|
|00001d90| 6d 62 65 72 20 6f 66 20 | 70 6c 61 79 65 72 73 0d |mber of |players.|
|00001da0| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00001db0| 73 75 6c 74 53 65 74 24 | 22 5c 5c 6d 61 78 70 6c |sultSet$|"\\maxpl|
|00001dc0| 61 79 65 72 73 5c 5c 22 | 24 4c 65 76 65 6c 2e 47 |ayers\\"|$Level.G|
|00001dd0| 61 6d 65 2e 4d 61 78 50 | 6c 61 79 65 72 73 3b 0d |ame.MaxP|layers;.|
|00001de0| 0a 0d 0a 09 2f 2f 20 54 | 68 65 20 67 61 6d 65 20 |....// T|he game |
|00001df0| 6d 6f 64 65 3a 20 6f 70 | 65 6e 70 6c 61 79 69 6e |mode: op|enplayin|
|00001e00| 67 0d 0a 09 52 65 73 75 | 6c 74 53 65 74 20 3d 20 |g...Resu|ltSet = |
|00001e10| 52 65 73 75 6c 74 53 65 | 74 24 22 5c 5c 67 61 6d |ResultSe|t$"\\gam|
|00001e20| 65 6d 6f 64 65 5c 5c 6f | 70 65 6e 70 6c 61 79 69 |emode\\o|penplayi|
|00001e30| 6e 67 22 3b 0d 0a 0d 0a | 09 2f 2f 20 54 68 65 20 |ng";....|.// The |
|00001e40| 76 65 72 73 69 6f 6e 20 | 6f 66 20 74 68 69 73 20 |version |of this |
|00001e50| 67 61 6d 65 2e 0d 0a 09 | 52 65 73 75 6c 74 53 65 |game....|ResultSe|
|00001e60| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00001e70| 5c 67 61 6d 65 76 65 72 | 5c 5c 22 24 4c 65 76 65 |\gamever|\\"$Leve|
|00001e80| 6c 2e 45 6e 67 69 6e 65 | 56 65 72 73 69 6f 6e 3b |l.Engine|Version;|
|00001e90| 0d 0a 0d 0a 09 2f 2f 20 | 54 68 65 20 6d 6f 73 74 |.....// |The most|
|00001ea0| 20 72 65 63 65 6e 74 20 | 6e 65 74 77 6f 72 6b 20 | recent |network |
|00001eb0| 63 6f 6d 70 61 74 69 62 | 6c 65 20 76 65 72 73 69 |compatib|le versi|
|00001ec0| 6f 6e 2e 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |on....Re|sultSet |
|00001ed0| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 6d |= Result|Set$"\\m|
|00001ee0| 69 6e 6e 65 74 76 65 72 | 5c 5c 22 24 4c 65 76 65 |innetver|\\"$Leve|
|00001ef0| 6c 2e 4d 69 6e 4e 65 74 | 56 65 72 73 69 6f 6e 3b |l.MinNet|Version;|
|00001f00| 0d 0a 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |.....Res|ultSet =|
|00001f10| 20 52 65 73 75 6c 74 53 | 65 74 24 4c 65 76 65 6c | ResultS|et$Level|
|00001f20| 2e 47 61 6d 65 2e 47 65 | 74 49 6e 66 6f 28 29 3b |.Game.Ge|tInfo();|
|00001f30| 0d 0a 0d 0a 09 72 65 74 | 75 72 6e 20 52 65 73 75 |.....ret|urn Resu|
|00001f40| 6c 74 53 65 74 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |ltSet;..|}....// |
|00001f50| 52 65 74 75 72 6e 20 61 | 20 73 74 72 69 6e 67 20 |Return a| string |
|00001f60| 6f 66 20 6d 69 73 63 65 | 6c 6c 61 6e 65 6f 75 73 |of misce|llaneous|
|00001f70| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0d 0a 2f | informa|tion.../|
|00001f80| 2f 20 47 61 6d 65 20 73 | 70 65 63 69 66 69 63 20 |/ Game s|pecific |
|00001f90| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2c 20 75 73 65 |informat|ion, use|
|00001fa0| 72 20 64 65 66 69 6e 65 | 64 20 64 61 74 61 2c 20 |r define|d data, |
|00001fb0| 63 75 73 74 6f 6d 20 70 | 61 72 61 6d 65 74 65 72 |custom p|arameter|
|00001fc0| 73 20 66 6f 72 20 74 68 | 65 20 63 6f 6d 6d 61 6e |s for th|e comman|
|00001fd0| 64 20 6c 69 6e 65 2e 0d | 0a 66 75 6e 63 74 69 6f |d line..|.functio|
|00001fe0| 6e 20 73 74 72 69 6e 67 | 20 47 65 74 52 75 6c 65 |n string| GetRule|
|00001ff0| 73 28 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 73 |s()..{..|.local s|
|00002000| 74 72 69 6e 67 20 52 65 | 73 75 6c 74 53 65 74 3b |tring Re|sultSet;|
|00002010| 0d 0a 0d 0a 09 52 65 73 | 75 6c 74 53 65 74 20 3d |.....Res|ultSet =|
|00002020| 20 4c 65 76 65 6c 2e 47 | 61 6d 65 2e 47 65 74 52 | Level.G|ame.GetR|
|00002030| 75 6c 65 73 28 29 3b 0d | 0a 0d 0a 09 2f 2f 20 41 |ules();.|....// A|
|00002040| 64 6d 69 6e 27 73 20 4e | 61 6d 65 0d 0a 09 69 66 |dmin's N|ame...if|
|00002050| 28 20 4c 65 76 65 6c 2e | 47 61 6d 65 2e 47 61 6d |( Level.|Game.Gam|
|00002060| 65 52 65 70 6c 69 63 61 | 74 69 6f 6e 49 6e 66 6f |eReplica|tionInfo|
|00002070| 2e 41 64 6d 69 6e 4e 61 | 6d 65 20 21 3d 20 22 22 |.AdminNa|me != ""|
|00002080| 20 29 0d 0a 09 09 52 65 | 73 75 6c 74 53 65 74 20 | )....Re|sultSet |
|00002090| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 41 |= Result|Set$"\\A|
|000020a0| 64 6d 69 6e 4e 61 6d 65 | 5c 5c 22 24 4c 65 76 65 |dminName|\\"$Leve|
|000020b0| 6c 2e 47 61 6d 65 2e 47 | 61 6d 65 52 65 70 6c 69 |l.Game.G|ameRepli|
|000020c0| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 41 64 6d 69 6e |cationIn|fo.Admin|
|000020d0| 4e 61 6d 65 3b 0d 0a 09 | 0d 0a 09 2f 2f 20 41 64 |Name;...|...// Ad|
|000020e0| 6d 69 6e 27 73 20 45 6d | 61 69 6c 0d 0a 09 69 66 |min's Em|ail...if|
|000020f0| 28 20 4c 65 76 65 6c 2e | 47 61 6d 65 2e 47 61 6d |( Level.|Game.Gam|
|00002100| 65 52 65 70 6c 69 63 61 | 74 69 6f 6e 49 6e 66 6f |eReplica|tionInfo|
|00002110| 2e 41 64 6d 69 6e 45 6d | 61 69 6c 20 21 3d 20 22 |.AdminEm|ail != "|
|00002120| 22 20 29 0d 0a 09 09 52 | 65 73 75 6c 74 53 65 74 |" )....R|esultSet|
|00002130| 20 3d 20 52 65 73 75 6c | 74 53 65 74 24 22 5c 5c | = Resul|tSet$"\\|
|00002140| 41 64 6d 69 6e 45 4d 61 | 69 6c 5c 5c 22 24 4c 65 |AdminEMa|il\\"$Le|
|00002150| 76 65 6c 2e 47 61 6d 65 | 2e 47 61 6d 65 52 65 70 |vel.Game|.GameRep|
|00002160| 6c 69 63 61 74 69 6f 6e | 49 6e 66 6f 2e 41 64 6d |lication|Info.Adm|
|00002170| 69 6e 45 6d 61 69 6c 3b | 0d 0a 0d 0a 09 72 65 74 |inEmail;|.....ret|
|00002180| 75 72 6e 20 52 65 73 75 | 6c 74 53 65 74 3b 0d 0a |urn Resu|ltSet;..|
|00002190| 7d 0d 0a 0d 0a 2f 2f 20 | 52 65 74 75 72 6e 20 61 |}....// |Return a|
|000021a0| 20 73 74 72 69 6e 67 20 | 6f 66 20 69 6e 66 6f 72 | string |of infor|
|000021b0| 6d 61 74 69 6f 6e 20 6f | 6e 20 61 20 70 6c 61 79 |mation o|n a play|
|000021c0| 65 72 2e 0d 0a 66 75 6e | 63 74 69 6f 6e 20 73 74 |er...fun|ction st|
|000021d0| 72 69 6e 67 20 47 65 74 | 50 6c 61 79 65 72 28 20 |ring Get|Player( |
|000021e0| 50 6c 61 79 65 72 50 61 | 77 6e 20 50 2c 20 69 6e |PlayerPa|wn P, in|
|000021f0| 74 20 50 6c 61 79 65 72 | 4e 75 6d 20 29 0d 0a 7b |t Player|Num )..{|
|00002200| 0d 0a 09 6c 6f 63 61 6c | 20 73 74 72 69 6e 67 20 |...local| string |
|00002210| 52 65 73 75 6c 74 53 65 | 74 3b 0d 0a 09 6c 6f 63 |ResultSe|t;...loc|
|00002220| 61 6c 20 73 74 72 69 6e | 67 20 53 6b 69 6e 4e 61 |al strin|g SkinNa|
|00002230| 6d 65 2c 20 46 61 63 65 | 4e 61 6d 65 3b 0d 0a 0d |me, Face|Name;...|
|00002240| 0a 09 2f 2f 20 4e 61 6d | 65 0d 0a 09 52 65 73 75 |..// Nam|e...Resu|
|00002250| 6c 74 53 65 74 20 3d 20 | 22 5c 5c 70 6c 61 79 65 |ltSet = |"\\playe|
|00002260| 72 5f 22 24 50 6c 61 79 | 65 72 4e 75 6d 24 22 5c |r_"$Play|erNum$"\|
|00002270| 5c 22 24 50 2e 50 6c 61 | 79 65 72 52 65 70 6c 69 |\"$P.Pla|yerRepli|
|00002280| 63 61 74 69 6f 6e 49 6e | 66 6f 2e 50 6c 61 79 65 |cationIn|fo.Playe|
|00002290| 72 4e 61 6d 65 3b 0d 0a | 0d 0a 09 2f 2f 20 46 72 |rName;..|...// Fr|
|000022a0| 61 67 73 0d 0a 09 52 65 | 73 75 6c 74 53 65 74 20 |ags...Re|sultSet |
|000022b0| 3d 20 52 65 73 75 6c 74 | 53 65 74 24 22 5c 5c 66 |= Result|Set$"\\f|
|000022c0| 72 61 67 73 5f 22 24 50 | 6c 61 79 65 72 4e 75 6d |rags_"$P|layerNum|
|000022d0| 24 22 5c 5c 22 24 69 6e | 74 28 50 2e 50 6c 61 79 |$"\\"$in|t(P.Play|
|000022e0| 65 72 52 65 70 6c 69 63 | 61 74 69 6f 6e 49 6e 66 |erReplic|ationInf|
|000022f0| 6f 2e 53 63 6f 72 65 29 | 3b 0d 0a 0d 0a 09 2f 2f |o.Score)|;.....//|
|00002300| 20 50 69 6e 67 0d 0a 09 | 52 65 73 75 6c 74 53 65 | Ping...|ResultSe|
|00002310| 74 20 3d 20 52 65 73 75 | 6c 74 53 65 74 24 22 5c |t = Resu|ltSet$"\|
|00002320| 5c 70 69 6e 67 5f 22 24 | 50 6c 61 79 65 72 4e 75 |\ping_"$|PlayerNu|
|00002330| 6d 24 22 5c 5c 22 24 50 | 2e 43 6f 6e 73 6f 6c 65 |m$"\\"$P|.Console|
|00002340| 43 6f 6d 6d 61 6e 64 28 | 22 47 45 54 50 49 4e 47 |Command(|"GETPING|
|00002350| 22 29 3b 0d 0a 0d 0a 09 | 2f 2f 20 54 65 61 6d 0d |");.....|// Team.|
|00002360| 0a 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00002370| 73 75 6c 74 53 65 74 24 | 22 5c 5c 74 65 61 6d 5f |sultSet$|"\\team_|
|00002380| 22 24 50 6c 61 79 65 72 | 4e 75 6d 24 22 5c 5c 22 |"$Player|Num$"\\"|
|00002390| 24 50 2e 50 6c 61 79 65 | 72 52 65 70 6c 69 63 61 |$P.Playe|rReplica|
|000023a0| 74 69 6f 6e 49 6e 66 6f | 2e 54 65 61 6d 3b 0d 0a |tionInfo|.Team;..|
|000023b0| 0d 0a 09 2f 2f 20 43 6c | 61 73 73 0d 0a 09 52 65 |...// Cl|ass...Re|
|000023c0| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|000023d0| 53 65 74 24 22 5c 5c 6d | 65 73 68 5f 22 24 50 6c |Set$"\\m|esh_"$Pl|
|000023e0| 61 79 65 72 4e 75 6d 24 | 22 5c 5c 22 24 50 2e 4d |ayerNum$|"\\"$P.M|
|000023f0| 65 6e 75 6e 61 6d 65 3b | 0d 0a 0d 0a 09 2f 2f 20 |enuname;|.....// |
|00002400| 53 6b 69 6e 0d 0a 09 69 | 66 28 50 2e 53 6b 69 6e |Skin...i|f(P.Skin|
|00002410| 20 3d 3d 20 4e 6f 6e 65 | 29 0d 0a 09 7b 0d 0a 09 | == None|)...{...|
|00002420| 09 50 2e 73 74 61 74 69 | 63 2e 47 65 74 4d 75 6c |.P.stati|c.GetMul|
|00002430| 74 69 53 6b 69 6e 28 50 | 2c 20 53 6b 69 6e 4e 61 |tiSkin(P|, SkinNa|
|00002440| 6d 65 2c 20 46 61 63 65 | 4e 61 6d 65 29 3b 0d 0a |me, Face|Name);..|
|00002450| 09 09 52 65 73 75 6c 74 | 53 65 74 20 3d 20 52 65 |..Result|Set = Re|
|00002460| 73 75 6c 74 53 65 74 24 | 22 5c 5c 73 6b 69 6e 5f |sultSet$|"\\skin_|
|00002470| 22 24 50 6c 61 79 65 72 | 4e 75 6d 24 22 5c 5c 22 |"$Player|Num$"\\"|
|00002480| 24 53 6b 69 6e 4e 61 6d | 65 3b 0d 0a 09 09 52 65 |$SkinNam|e;....Re|
|00002490| 73 75 6c 74 53 65 74 20 | 3d 20 52 65 73 75 6c 74 |sultSet |= Result|
|000024a0| 53 65 74 24 22 5c 5c 66 | 61 63 65 5f 22 24 50 6c |Set$"\\f|ace_"$Pl|
|000024b0| 61 79 65 72 4e 75 6d 24 | 22 5c 5c 22 24 46 61 63 |ayerNum$|"\\"$Fac|
|000024c0| 65 4e 61 6d 65 3b 0d 0a | 09 7d 0d 0a 09 65 6c 73 |eName;..|.}...els|
|000024d0| 65 0d 0a 09 7b 0d 0a 09 | 09 52 65 73 75 6c 74 53 |e...{...|.ResultS|
|000024e0| 65 74 20 3d 20 52 65 73 | 75 6c 74 53 65 74 24 22 |et = Res|ultSet$"|
|000024f0| 5c 5c 73 6b 69 6e 5f 22 | 24 50 6c 61 79 65 72 4e |\\skin_"|$PlayerN|
|00002500| 75 6d 24 22 5c 5c 22 24 | 73 74 72 69 6e 67 28 50 |um$"\\"$|string(P|
|00002510| 2e 53 6b 69 6e 29 3b 0d | 0a 09 09 52 65 73 75 6c |.Skin);.|...Resul|
|00002520| 74 53 65 74 20 3d 20 52 | 65 73 75 6c 74 53 65 74 |tSet = R|esultSet|
|00002530| 24 22 5c 5c 66 61 63 65 | 5f 22 24 50 6c 61 79 65 |$"\\face|_"$Playe|
|00002540| 72 4e 75 6d 24 22 5c 5c | 4e 6f 6e 65 22 3b 0d 0a |rNum$"\\|None";..|
|00002550| 09 7d 0d 0a 0d 0a 09 72 | 65 74 75 72 6e 20 52 65 |.}.....r|eturn Re|
|00002560| 73 75 6c 74 53 65 74 3b | 0d 0a 7d 0d 0a 0d 0a 2f |sultSet;|..}..../|
|00002570| 2f 20 53 65 6e 64 20 64 | 61 74 61 20 66 6f 72 20 |/ Send d|ata for |
|00002580| 65 61 63 68 20 70 6c 61 | 79 65 72 0d 0a 66 75 6e |each pla|yer..fun|
|00002590| 63 74 69 6f 6e 20 62 6f | 6f 6c 20 53 65 6e 64 50 |ction bo|ol SendP|
|000025a0| 6c 61 79 65 72 73 28 49 | 70 41 64 64 72 20 41 64 |layers(I|pAddr Ad|
|000025b0| 64 72 2c 20 69 6e 74 20 | 51 75 65 72 79 4e 75 6d |dr, int |QueryNum|
|000025c0| 2c 20 6f 75 74 20 69 6e | 74 20 50 61 63 6b 65 74 |, out in|t Packet|
|000025d0| 4e 75 6d 2c 20 73 74 72 | 69 6e 67 20 46 69 6e 61 |Num, str|ing Fina|
|000025e0| 6c 50 61 63 6b 65 74 29 | 0d 0a 7b 0d 0a 09 6c 6f |lPacket)|..{...lo|
|000025f0| 63 61 6c 20 50 61 77 6e | 20 50 3b 0d 0a 09 6c 6f |cal Pawn| P;...lo|
|00002600| 63 61 6c 20 69 6e 74 20 | 69 3b 0d 0a 09 6c 6f 63 |cal int |i;...loc|
|00002610| 61 6c 20 62 6f 6f 6c 20 | 52 65 73 75 6c 74 2c 20 |al bool |Result, |
|00002620| 53 65 6e 64 52 65 73 75 | 6c 74 3b 0d 0a 09 0d 0a |SendResu|lt;.....|
|00002630| 09 52 65 73 75 6c 74 20 | 3d 20 66 61 6c 73 65 3b |.Result |= false;|
|00002640| 0d 0a 0d 0a 09 50 20 3d | 20 4c 65 76 65 6c 2e 50 |.....P =| Level.P|
|00002650| 61 77 6e 4c 69 73 74 3b | 0d 0a 09 77 68 69 6c 65 |awnList;|...while|
|00002660| 28 20 69 20 3c 20 4c 65 | 76 65 6c 2e 47 61 6d 65 |( i < Le|vel.Game|
|00002670| 2e 4e 75 6d 50 6c 61 79 | 65 72 73 20 29 0d 0a 09 |.NumPlay|ers )...|
|00002680| 7b 0d 0a 09 09 69 66 20 | 28 50 2e 49 73 41 28 27 |{....if |(P.IsA('|
|00002690| 50 6c 61 79 65 72 50 61 | 77 6e 27 29 29 0d 0a 09 |PlayerPa|wn'))...|
|000026a0| 09 7b 0d 0a 09 09 09 69 | 66 28 20 69 3d 3d 4c 65 |.{.....i|f( i==Le|
|000026b0| 76 65 6c 2e 47 61 6d 65 | 2e 4e 75 6d 50 6c 61 79 |vel.Game|.NumPlay|
|000026c0| 65 72 73 2d 31 20 26 26 | 20 46 69 6e 61 6c 50 61 |ers-1 &&| FinalPa|
|000026d0| 63 6b 65 74 3d 3d 22 66 | 69 6e 61 6c 22 20 29 0d |cket=="f|inal" ).|
|000026e0| 0a 09 09 09 09 53 65 6e | 64 52 65 73 75 6c 74 20 |.....Sen|dResult |
|000026f0| 3d 20 53 65 6e 64 51 75 | 65 72 79 50 61 63 6b 65 |= SendQu|eryPacke|
|00002700| 74 28 41 64 64 72 2c 20 | 47 65 74 50 6c 61 79 65 |t(Addr, |GetPlaye|
|00002710| 72 28 50 6c 61 79 65 72 | 50 61 77 6e 28 50 29 2c |r(Player|Pawn(P),|
|00002720| 20 69 29 2c 20 51 75 65 | 72 79 4e 75 6d 2c 20 2b | i), Que|ryNum, +|
|00002730| 2b 50 61 63 6b 65 74 4e | 75 6d 2c 20 22 66 69 6e |+PacketN|um, "fin|
|00002740| 61 6c 22 29 3b 0d 0a 09 | 09 09 65 6c 73 65 0d 0a |al");...|..else..|
|00002750| 09 09 09 09 53 65 6e 64 | 52 65 73 75 6c 74 20 3d |....Send|Result =|
|00002760| 20 53 65 6e 64 51 75 65 | 72 79 50 61 63 6b 65 74 | SendQue|ryPacket|
|00002770| 28 41 64 64 72 2c 20 47 | 65 74 50 6c 61 79 65 72 |(Addr, G|etPlayer|
|00002780| 28 50 6c 61 79 65 72 50 | 61 77 6e 28 50 29 2c 20 |(PlayerP|awn(P), |
|00002790| 69 29 2c 20 51 75 65 72 | 79 4e 75 6d 2c 20 2b 2b |i), Quer|yNum, ++|
|000027a0| 50 61 63 6b 65 74 4e 75 | 6d 2c 20 22 22 29 3b 0d |PacketNu|m, "");.|
|000027b0| 0a 09 09 09 52 65 73 75 | 6c 74 20 3d 20 53 65 6e |....Resu|lt = Sen|
|000027c0| 64 52 65 73 75 6c 74 20 | 7c 7c 20 52 65 73 75 6c |dResult ||| Resul|
|000027d0| 74 3b 0d 0a 09 09 09 69 | 2b 2b 3b 0d 0a 09 09 7d |t;.....i|++;....}|
|000027e0| 0d 0a 09 09 50 20 3d 20 | 50 2e 6e 65 78 74 50 61 |....P = |P.nextPa|
|000027f0| 77 6e 3b 0d 0a 09 7d 0d | 0a 0d 0a 09 72 65 74 75 |wn;...}.|....retu|
|00002800| 72 6e 20 52 65 73 75 6c | 74 3b 0d 0a 7d 0d 0a 0d |rn Resul|t;..}...|
|00002810| 0a 2f 2f 20 47 65 74 20 | 61 6e 20 61 72 62 69 74 |.// Get |an arbit|
|00002820| 72 61 72 79 20 70 72 6f | 70 65 72 74 79 20 66 72 |rary pro|perty fr|
|00002830| 6f 6d 20 74 68 65 20 6c | 65 76 65 6c 20 6f 62 6a |om the l|evel obj|
|00002840| 65 63 74 2e 0d 0a 66 75 | 6e 63 74 69 6f 6e 20 73 |ect...fu|nction s|
|00002850| 74 72 69 6e 67 20 47 65 | 74 4c 65 76 65 6c 50 72 |tring Ge|tLevelPr|
|00002860| 6f 70 65 72 74 79 28 20 | 73 74 72 69 6e 67 20 50 |operty( |string P|
|00002870| 72 6f 70 20 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |rop )..{|...local|
|00002880| 20 73 74 72 69 6e 67 20 | 52 65 73 75 6c 74 53 65 | string |ResultSe|
|00002890| 74 3b 0d 0a 09 0d 0a 09 | 52 65 73 75 6c 74 53 65 |t;......|ResultSe|
|000028a0| 74 20 3d 20 22 5c 5c 22 | 24 50 72 6f 70 24 22 5c |t = "\\"|$Prop$"\|
|000028b0| 5c 22 24 4c 65 76 65 6c | 2e 47 65 74 50 72 6f 70 |\"$Level|.GetProp|
|000028c0| 65 72 74 79 54 65 78 74 | 28 50 72 6f 70 29 3b 0d |ertyText|(Prop);.|
|000028d0| 0a 09 0d 0a 09 72 65 74 | 75 72 6e 20 52 65 73 75 |.....ret|urn Resu|
|000028e0| 6c 74 53 65 74 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 |ltSet;..|}....// |
|000028f0| 47 65 74 20 61 6e 20 61 | 72 62 69 74 72 61 72 79 |Get an a|rbitrary|
|00002900| 20 70 72 6f 70 65 72 74 | 79 20 66 72 6f 6d 20 74 | propert|y from t|
|00002910| 68 65 20 67 61 6d 65 20 | 6f 62 6a 65 63 74 2e 0d |he game |object..|
|00002920| 0a 66 75 6e 63 74 69 6f | 6e 20 73 74 72 69 6e 67 |.functio|n string|
|00002930| 20 47 65 74 47 61 6d 65 | 50 72 6f 70 65 72 74 79 | GetGame|Property|
|00002940| 28 20 73 74 72 69 6e 67 | 20 50 72 6f 70 20 29 0d |( string| Prop ).|
|00002950| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 73 74 72 69 6e |.{...loc|al strin|
|00002960| 67 20 52 65 73 75 6c 74 | 53 65 74 3b 0d 0a 0d 0a |g Result|Set;....|
|00002970| 09 52 65 73 75 6c 74 53 | 65 74 20 3d 20 22 5c 5c |.ResultS|et = "\\|
|00002980| 22 24 50 72 6f 70 24 22 | 5c 5c 22 24 4c 65 76 65 |"$Prop$"|\\"$Leve|
|00002990| 6c 2e 47 61 6d 65 2e 47 | 65 74 50 72 6f 70 65 72 |l.Game.G|etProper|
|000029a0| 74 79 54 65 78 74 28 50 | 72 6f 70 29 3b 0d 0a 09 |tyText(P|rop);...|
|000029b0| 0d 0a 09 72 65 74 75 72 | 6e 20 52 65 73 75 6c 74 |...retur|n Result|
|000029c0| 53 65 74 3b 0d 0a 7d 0d | 0a 0d 0a 2f 2f 20 47 65 |Set;..}.|...// Ge|
|000029d0| 74 20 61 6e 20 61 72 62 | 69 74 72 61 72 79 20 70 |t an arb|itrary p|
|000029e0| 72 6f 70 65 72 74 79 20 | 66 72 6f 6d 20 74 68 65 |roperty |from the|
|000029f0| 20 70 6c 61 79 65 72 73 | 2e 0d 0a 66 75 6e 63 74 | players|...funct|
|00002a00| 69 6f 6e 20 73 74 72 69 | 6e 67 20 47 65 74 50 6c |ion stri|ng GetPl|
|00002a10| 61 79 65 72 50 72 6f 70 | 65 72 74 79 28 20 73 74 |ayerProp|erty( st|
|00002a20| 72 69 6e 67 20 50 72 6f | 70 20 29 0d 0a 7b 0d 0a |ring Pro|p )..{..|
|00002a30| 09 6c 6f 63 61 6c 20 73 | 74 72 69 6e 67 20 52 65 |.local s|tring Re|
|00002a40| 73 75 6c 74 53 65 74 3b | 0d 0a 09 6c 6f 63 61 6c |sultSet;|...local|
|00002a50| 20 69 6e 74 20 69 3b 0d | 0a 09 6c 6f 63 61 6c 20 | int i;.|..local |
|00002a60| 50 6c 61 79 65 72 50 61 | 77 6e 20 50 3b 0d 0a 0d |PlayerPa|wn P;...|
|00002a70| 0a 09 66 6f 72 65 61 63 | 68 20 41 6c 6c 41 63 74 |..foreac|h AllAct|
|00002a80| 6f 72 73 28 63 6c 61 73 | 73 27 50 6c 61 79 65 72 |ors(clas|s'Player|
|00002a90| 50 61 77 6e 27 2c 20 50 | 29 20 7b 0d 0a 09 09 69 |Pawn', P|) {....i|
|00002aa0| 2b 2b 3b 0d 0a 09 09 52 | 65 73 75 6c 74 53 65 74 |++;....R|esultSet|
|00002ab0| 20 3d 20 52 65 73 75 6c | 74 53 65 74 24 22 5c 5c | = Resul|tSet$"\\|
|00002ac0| 22 24 50 72 6f 70 24 22 | 5f 22 24 69 24 22 5c 5c |"$Prop$"|_"$i$"\\|
|00002ad0| 22 24 50 2e 47 65 74 50 | 72 6f 70 65 72 74 79 54 |"$P.GetP|ropertyT|
|00002ae0| 65 78 74 28 50 72 6f 70 | 29 3b 0d 0a 09 7d 0d 0a |ext(Prop|);...}..|
|00002af0| 09 0d 0a 09 72 65 74 75 | 72 6e 20 52 65 73 75 6c |....retu|rn Resul|
|00002b00| 74 53 65 74 3b 0d 0a 7d | 0d 0a 0d 0a 00 |tSet;..}|..... |
+--------+-------------------------+-------------------------+--------+--------+